﻿using System.ComponentModel.DataAnnotations;

namespace Entity.ERP.DTO.SaleOrder
{
    /// <summary>
    /// 销售订单模型 - 更新
    /// </summary>
    public class SaleOrderUpdateDTO
    {
        /// <summary>
        /// 销售订单 ID
        /// </summary>
        [Required(ErrorMessage = "销售订单Id不能为空")]
        public string Id { get; set; }

        /// <summary>
        /// 销售编码
        /// </summary>
        [Required(ErrorMessage = "销售编码Code不能为空")]
        public string Code { get; set; }

        /// <summary>
        /// 流转卡号
        /// </summary>
        [Required(ErrorMessage = "流转卡号CardNo不能为空")]
        public string CardNo { get; set; }

        /// <summary>
        /// 客户 ID
        /// </summary>
        [Required(ErrorMessage = "客户CustomerId不能为空")]
        public string CustomerId { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }

        /// <summary>
        /// 附件
        /// </summary>
        public string? File { get; set; }

        /// <summary>
        /// 销售订单子单
        /// </summary>
        [Required(ErrorMessage = "销售订单子单items不能为空")]
        public List<SaleOrderItemUpdateDTO> items { get; set; }
    }
}
